home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
LIBRARY
/
PAS_0693
/
SCROLLNG.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-06-30
|
1KB
|
48 lines
{─ Fido Pascal Conference ────────────────────────────────────────────── PASCAL ─
Msg : 508 of 587
From : Sean Palmer 1:104/123.0 06 Jun 93 14:52
To : Ryan Brown
Subj : Scrolling
────────────────────────────────────────────────────────────────────────────────
RB>How would i scroll something across the screen? Just normal ASCII chars. not
RB>graphics. I thought about moving one char at a time butthat'd take..
RB>forvere!
actually one character at a time is always how non-hardware scrolling is
done...
try this little code:}
const videoSeg:word=$B800;
procedure moveToScreen(var str;len:byte;x,y:word);assembler;asm
mov ax,80
mul y
add ax,x
shl ax,1
mov di,ax
mov es,videoSeg
mov cl,len
xor ch,ch
cld
push ds
lds si,str
@L:
movsb
inc di
loop @L
pop ds;
end;
const msg:string=
'This is the message that will scroll across the bottom of '+
'the screen if you run the procedure scrollMsg '+
' ';
procedure scrollMsg;var i:integer; begin {scroll msg across bottom}
for I:=1 to (length(msg)-79) do
moveToScreen(msg[i],80,0,24);
end;
This all is very very untested...